from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager


def get_driver():
    # 创建Chrome浏览器服务
    s = Service(ChromeDriverManager().install())
    # 启动Chrome浏览器并打开指定网址
    driver = webdriver.Chrome(service=s)
    return driver